package com.scalar.forecast.projectSetup.actionCommands;

import com.scalar.forecast.commons.Constants;
import com.scalar.forecast.actionCommands.ActionCommand;

/**
 * Returns the Action Command Instance based on the action value passed
 *
 * Created by Veeru. 
 * Date: Feb 8, 2005
 * Time: 12:35:19 PM 
 */

public class ProjectSetupActionCommandFactory implements Constants {


    public static ActionCommand getActionCommand( String action ) {

        if ( ACTION_NEW.equalsIgnoreCase( action ) ) {
            return new ProjectSetupNewCommand();
        }
        else if ( ACTION_MODIFY.equalsIgnoreCase( action ) ) {
            return new ProjectSetupModifyCommand();
        }
        else if ( ACTION_SAVE.equalsIgnoreCase( action ) ) {
            return new ProjectSetupSaveCommand();
        }
        else if ( ACTION_EDIT.equalsIgnoreCase( action ) ) {
            return new ProjectSetupEditCommand();
        }
        else if ( ACTION_CONFIRM.equalsIgnoreCase( action ) ) {
            return new ProjectSetupConfirmCommand();
        }
        else if ( ACTION_VIEW.equalsIgnoreCase( action ) ) {
            return new ProjectSetupViewCommand();
        }
        else if ( ACTION_DELETE.equalsIgnoreCase( action ) ) {
            return new ProjectSetupDeleteCommand();
        }
        else if ( ACTION_LOAD_ODMS.equalsIgnoreCase( action )) {
            return new ProjectSetupLoadOdmsCommand();
        }
        else if ( ACTION_LOAD_PROJECT_FORECAST_DETAILS.equalsIgnoreCase( action ) )
        {
            return new ProjectSetupProjectForecastViewCommand();
        }
        return null;
    }

}
